package vno.ky.mapMaker
{
	import flash.display.Shape;
	import flash.display.Sprite;
	public class Grip extends Sprite
	{
		public static var pixel:int=4;
		public function Grip()
		{
		}
		public function drawGrips():void			//画背景网格
		{
			var lin:int=0;
			var col:int=0;
			var count:int=0;
			for(lin=0;lin<=stage.stageWidth/pixel;lin++)
			{
				if(count%2==0)
				{
					col=0;
				}
				else
				{
					col=1;
				}
				for( ;col<=stage.stageHeight/pixel-2;col=col+2)
				{
					var rect:Shape=new Shape();
					rect.graphics.beginFill(0xff0000);
					rect.graphics.drawRect(lin*pixel,col*pixel,pixel,pixel);
					rect.graphics.endFill();
					addChild(rect);
				}
				count++;
			}
		}
	}
}